﻿<dw:DialogWindow x:Class="ErikEJ.SqlCeToolbox.Dialogs.ConnectionDialog"
        xmlns:dw="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.10.0"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:self="clr-namespace:ErikEJ.SqlCeToolbox"
        xmlns:Dialogs="clr-namespace:ErikEJ.SqlCeToolbox.Dialogs"
        xmlns:extToolkit="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid;assembly=Xceed.Wpf.Toolkit"
        xmlns:extToolkit2="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
        Icon="../Resources/gear_16xLG.png"
        Title="Add SQL Server Compact/SQLite Connection" 
        WindowStyle="SingleBorderWindow"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize" 
        ShowInTaskbar="False"
        mc:Ignorable="d" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Loaded="Window_Loaded" Height="384" Width="532">
       <Grid Width="511">
        <Grid.RowDefinitions>
            <RowDefinition Height="94" />
            <RowDefinition Height="52" />
            <RowDefinition Height="52" />
            <RowDefinition Height="103" />
            <RowDefinition Height="85*" />
        </Grid.RowDefinitions>
        <Label Margin="12,12,0,0" Content="Filename:" HorizontalAlignment="Left" Width="121" Height="28" VerticalAlignment="Top"></Label>
        <Label Margin="12,0,0,0" Grid.Row="2" x:Name="lblPw" Content="Password:" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left" Width="89"></Label>
        
        <TextBox Name="dataSourceTextBox" TextChanged="textBox_TextChanged" Margin="12,0,12,30" TabIndex="0" Height="23" VerticalAlignment="Bottom" />
        <extToolkit2:IntegerUpDown x:Name="maxSize" IsReadOnly="False" Value="256" Increment="1" Maximum="4091" Minimum="16" Grid.Row="1" Margin="12,29,0,0" TabIndex="2" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="89" ValueChanged="maxSize_ValueChanged" />
        <TextBox x:Name="password" Grid.Row="2"  TextChanged="password_PasswordChanged" Margin="12,0" TabIndex="3" Height="23" VerticalAlignment="Bottom" />
        <TextBox TextWrapping="Wrap" x:Name="txtConnection" Grid.Row="3" TextChanged="txtConnection_TextChanged" Margin="12,21,12,0" TabIndex="4" Height="48" VerticalAlignment="Top" />

        <dw:DialogButton Content="_Browse..." Height="23" Name="btnBrowse" VerticalAlignment="Top" Click="btnBrowse_Click" TabIndex="1" Margin="0,71,12,0" HorizontalAlignment="Right" Width="75" />
        <Label Content="Connection String:" Grid.Row="3" Margin="12,0,368,75" />
        <dw:DialogButton Name="TestButton"  Click="TestButton_Click" Grid.Row="4" TabIndex="5" SnapsToDevicePixels="False" Margin="12,10,0,0" Height="23" VerticalAlignment="Top" HorizontalAlignment="Left" Width="131">_Test Connection</dw:DialogButton>
        <dw:DialogButton Name="CancelButton" IsCancel="True"  Click="CancelButton_Click" Grid.Row="4" TabIndex="6" Margin="0,10,12,0" Height="23" VerticalAlignment="Top" HorizontalAlignment="Right" Width="75">Cancel</dw:DialogButton>
        <dw:DialogButton Name="SaveButton" IsDefault="True"  Click="SaveButton_Click" Grid.Row="4" TabIndex="5" Margin="0,10,93,0" Height="23" VerticalAlignment="Top" HorizontalAlignment="Right" Width="75">OK</dw:DialogButton>
        <dw:DialogButton Content="_Create..." Margin="0,71,93,0" Name="CreateButton" Height="23" VerticalAlignment="Top" HorizontalAlignment="Right" Width="75" Click="CreateButton_Click" />
        <Label x:Name="lblMax" Content="Max database size in MB (From 16 to 4091) :" Margin="12,0,0,0" Grid.Row="1" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left" Width="248" />
        <TextBlock Visibility="Collapsed" x:Name="txtDDEX" TextWrapping="Wrap" Text="This database connection will be added to Server Explorer, enabling you to use it with the Entity Framework Tools" Height="40" Margin="12,67,12,0" VerticalAlignment="Top" Grid.Row="3" Grid.RowSpan="2" />
    </Grid>
</dw:DialogWindow>
